Function Name Prefixing

To ensure a unique name when User-Defined Functions appear in the Formula Editor, Crystal Reports appends a prefix to each function name that is generated from the project and Class Module names in the original source code. The first part of the prefix is the project name without the CRUFL prefix. The rest of the function name prefix is the Class Module name.

Once the prefix for the function name is generated, all non-alphanumeric characters are removed, and the prefix is applied to the original function name. The following table illustrates this process:

Project Name:

CRUFLTestFunctions

Class Module Name:

Conversion

User Defined Function Name:

Date_To_String()

Formula Editor Function:

TestFunctionsConversionDateToString()

This function name prefixing can be turned off if you are sure that your function names will not conflict with any other function names recognized by the Formula Editor. To turn off function name prefixing:

  1. Define a Boolean property for the class called UFPrefixFunctions.
  2. Set the value of the property to False in the Initialize subroutine for the class.

    For example:

Public UFPrefixFunctions As Boolean
Private Sub Class_Initialize()
    UFPrefixFunctions = False
End Sub

Note:    Function name prefixing is designed to eliminate function name conflicts. If you turn off function name prefixing and your function name conflicts with another function, you may get unpredictable results.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com